﻿
/**
* 命名空间: Game.TDBehaviorTree
*
* 功 能： 处理Ongui绘制报错
* 类 名： ExitGUIUtility
*
* Ver 变更日期 负责人 变更内容
* ───────────────────────────────────
* V0.01 2019/12/16 11:12:50  
*/




using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace Game.TDBehaviorTree
{
    public static class ExitGUIUtility
    {
        public static bool ShouldRethrowException(Exception e)
        {
            return IsExitGUIException(e);
        }

        public static bool IsExitGUIException(Exception e)
        {
            while(e is TargetInvocationException && e.InnerException != null)
            {
                e = e.InnerException;
            }
            return e is ExitGUIException;
        } 
    }
}
